package view.items;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.JPanel;

import model.Call;

import controller.Controller;
import controller.ControllerLighter;

public abstract class PanelAbstract extends JPanel {

	protected Call call;
	protected Color colorLabel;
	protected Color defaultBgColor = Color.DARK_GRAY;
	protected Color selectedBgColor = new Color((int) 0x388df9);
	
	public Call getCall() {
		return call;
	}

	public void setCall(Call call) {
		this.call = call;
	}

	public PanelAbstract(Call call, ControllerLighter controllerLighter){
		this.call = call;
		this.setLayout(new FlowLayout(FlowLayout.LEFT));
		this.setPreferredSize(new Dimension(300,30));
		this.addMouseListener(controllerLighter);
		
		if(call.isClickedOnGui()){
			 colorLabel = Color.white;
			 this.setBackground(new Color((int) 0x388df9));
		}
		else {
			this.setBackground(Color.lightGray);
			colorLabel = Color.DARK_GRAY;
		}
		
	}
	

}
